Repository navigation
fix(install): pre-flight SSH github.com marketplace plugins over SSH - #3200
Conversation
An in-repository plugin from a github.com marketplace registered over SSH resolves to a virtual subdirectory reference with explicit_scheme == "ssh", but validation sent every GitHub-host virtual package to the HTTPS-only downloader probes. With only an SSH key, a private marketplace failed the pre-flight even though the download step uses SSH. Route such references to the git ls-remote clone-root probe that non-GitHub hosts use since microsoft#2063, so strict SSH mode makes no HTTPS probe. HTTPS registrations keep the downloader probes. Fixes microsoft#3164
There was a problem hiding this comment.
🟡 Changes recommended
Transport ownership, inaccurate SSH failure diagnostics, stale auth guidance, and missing type annotations remain unresolved.
4 open findings
What changed in this PR
Fixes SSH-only pre-flight validation for in-repository plugins from SSH-registered GitHub marketplaces.
Changes:
- Routes explicit SSH GitHub subdirectories through
git ls-remote. - Adds SSH/HTTPS regression coverage.
- Updates marketplace documentation and changelog.
| File | Description |
|---|---|
src/apm_cli/install/validation.py |
Adds SSH-aware validation routing. |
tests/unit/install/test_validation_github_ssh_subdir.py |
Tests SSH-only and unchanged HTTPS behavior. |
docs/src/content/docs/consumer/installing-from-marketplaces.md |
Documents GitHub SSH marketplace support. |
CHANGELOG.md |
Records the fix. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Decide the clone-root probe with initial_transport_scheme() instead of re-reading explicit_scheme, and guard that consumer in the marketplace-package-remote architecture rule. When the clone-root probe ran, stop reporting the four-probe chain; an SSH failure now names the SSH key. Update both authentication pages and type the new test helpers.
Preserve current upstream fixes before validating the SSH marketplace route. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Test coverage expert | 0 | 0 | 0 | CI repair adds genuine req-lk-003 spec annotation over existing real-Git-fixture integration test; no bypass, no gate weakening, 8 mutation traps prove regression detection. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Recommendation
Current exact-head validation: 402 passed in 53.99s; conformance: 315 passed, 2 skipped in 92.39s; all seven current lint checks and the architecture boundary check passed. Canonical-owner evidence was re-derived and semantically verified for this exact head and integrated base. The eight prior mutation executions are retained with unchanged regression files; no new mutation run is claimed.
Four distinct specialist personas across two delta waves (auth, test-coverage, performance, supply-chain-security in the prior wave; test-coverage in the CI-repair wave) -- five returns total -- yield zero aggregate findings. The production diff is byte-identical to the prior ship_now assessment. Spec-conformance CI repair adds genuine req-lk-003 evidence without gate weakening. The code is ready to ship; all six technical workflows have now succeeded at this exact head. No follow-ups to track.
Final observation: Published/reviewed head d3d0679ae95ebbf3262f9f7c3d67ca588c470d50 has all six technical workflows passing. The earlier head's transient Windows runner-profile cleanup failure passed on its one targeted rerun; the replacement head's CI was observed independently. No production code or check policy was changed during mechanical integration. All four original review threads are resolved. Existing requested reviewers remain unchanged.
GitHub currently reports MERGEABLE, while a fresh local merge preview against main ee08bb59b9a7bce67fb4010e4af8652c4c53a7de is clean with no overlap in this PR's changed source paths. The locally tested incorporated base remains ee08bb59b9a7bce67fb4010e4af8652c4c53a7de; the later main preview is not a claim of full retesting on a later base. Landing remains the maintainer's decision. No merge was performed.
Full per-persona findings
Test coverage expert
No findings.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
Exercise marketplace registration, preflight, download, lockfile and deployment with real Git over a hermetic SSH fixture. Keep named SSH references out of the HTTPS commits API and verify a requested ref after bare clone fallback instead of silently accepting HEAD. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Verify qualified refs and reject absent refs using the canonical Git helper with explicit bare-repository selection. Scrub the remote before local validation can fail and cover both paths with real Git under safe.bareRepository=explicit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Address the Spec conformance Mode B failure with real req-lk-003 evidence rather than a waiver. SHA-pinned and named SSH marketplace installs now assert the exact persisted repository and resolved commit, using the existing native Git fixture. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve the reviewed SSH marketplace patch and upstream behavior without rewriting contributor history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Faithfully retain reviewed SSH transport behavior and upstream manifestless marketplace certification. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
bd9fd4a
into
microsoft:main


Description
An in-repo plugin from a
github.commarketplace registered over SSH resolves withexplicit_scheme="ssh", but_validate_package_existssent it to the HTTPS-only downloader probes, so an SSH-key-only private marketplace failed pre-flight. It now takes thegit ls-remoteclone-root probe from #2063. HTTPS registrations are unchanged.Issue and approved scope
Issue: #3164
Human scope-approval comment: #3164 (comment)
Remaining: a CLI install against a real SSH-only private marketplace.
Type of change
Testing
Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdateddocs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated@pytest.mark.req("req-XXX")test undertests/spec_conformance/CONFORMANCE.{md,json}regenerated viagen_statement